unit ufTask_Property_ActionRunExportProc;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, ufTask_Property_ActionCustom,
  Vcl.StdCtrls, uTasks, ufTask_Property_ActionValuesEditor;

type
  TfTask_Property_ActionRunExportProc = class(TTfTask_Property_ActionCustom)
    Label1: TLabel;
    eExportProcName: TEdit;
    fValuesEditor: TfTask_Property_ActionValuesEditor;
  private
  public
    procedure Prepare(AStep: TStep); override;
    procedure Save; override;
    procedure Check; override;
  end;

implementation

{$R *.dfm}

uses
  u1cAgentServerConst;

{ TfTask_Property_ActionRunExportProc }

procedure TfTask_Property_ActionRunExportProc.Check;
begin
  eExportProcName.Text:= Trim(eExportProcName.Text);
  if eExportProcName.Text= '' then begin
    eExportProcName.SetFocus;
    raise Exception.Create(sSRV_42);
  end;
end;

procedure TfTask_Property_ActionRunExportProc.Prepare(AStep: TStep);
begin
  inherited;
  eExportProcName.Text:= AStep.ExportProcName;
  fValuesEditor.Prepare(AStep.ProcValues);
end;

procedure TfTask_Property_ActionRunExportProc.Save;
begin
  FStep.ExportProcName:= eExportProcName.Text;
  fValuesEditor.Save;
end;

end.
